package com.webxp.log;

import com.webxp.config.PropertyFile;
import org.apache.log4j.*;

public class Log4jInit {

	private static String sConfigFileName = "log4jConfig";

	public static void init() {
		String file = PropertyFile.getProperty(sConfigFileName);
		// 从Servlet参数读取log4j的配置文件
		if (file != null) {
			PropertyConfigurator.configure(file);
		}
	}

	public static void main(String[] args) {
		PropertyFile.loadProperty();
		Log4jInit.init();
	}

}
